package org.example.demo.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name="Student")
@ApiModel(description="学生实体类")
public class Student{

    @Id
    @ApiModelProperty(value="学生ID",example="1")
    private Long id;

    @Column(name="name")
    @ApiModelProperty(value="学生姓名",example="张三")
    private String name;

    @Column(name="age")
    @ApiModelProperty(value="学生年龄",example="19")
    private Integer age;

}